<ui:composition template="/WEB-INF/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<ui:composition template="/templates/menu-template.xhtml">
		<ui:define name="title">
			<h:outputText value="#{msg.catalogoComercios}" />
		</ui:define>
		<ui:define name="content">
			<a4j:form id="form">
				<rich:panel>
					<a4j:keepAlive beanName="beanCompany" />
					<f:facet name="header">
						<h:outputText value="#{msg.escogerAccion}" />
					</f:facet>
					<h:panelGrid columns="1">
						<a4j:commandButton id="addCompanyCmdBtn" ajaxSingle="true"
							value="#{msg.agregarComercio}">
							<rich:componentControl for="mpAgregarCompany"
								attachTo="addCompanyCmdBtn" operation="show" event="onclick" />
						</a4j:commandButton>
					</h:panelGrid>
					<rich:spacer height="20px" />
					<rich:extendedDataTable value="#{beanCompany.listItems}" var="item"
						id="table" rows="10" reRender="datascroller"
						style="margin-left: auto; margin-right: auto; text-align: center;"
						width="100%">
						<rich:column id="tradenameColumn" label="#{msg.tradename}"
							width="10%">
							<f:facet name="header">
								<h:outputText value="#{msg.tradename}" />
							</f:facet>
							<h:outputText value="#{item.tradename}" />
						</rich:column>
						<rich:column id="socialReasonColumn" label="#{msg.socialReason}"
							width="10%">
							<f:facet name="header">
								<h:outputText value="#{msg.socialReason}" />
							</f:facet>
							<h:outputText value="#{item.socialReason}" />
						</rich:column>
						<rich:column id="countryColumn" label="#{msg.city}" width="10%">
							<f:facet name="header">
								<h:outputText value="#{msg.city}" />
							</f:facet>
							<h:outputText value="#{item.country}" />
						</rich:column>
						<rich:column id="stateColumn" label="#{msg.state}" width="10%">
							<f:facet name="header">
								<h:outputText value="#{msg.state}" />
							</f:facet>
							<h:outputText value="#{item.state}" />
						</rich:column>
						<rich:column id="streetColumn" label="#{msg.street}" width="20%">
							<f:facet name="header">
								<h:outputText value="#{msg.street}" />
							</f:facet>
							<h:outputText value="#{item.street}" />
						</rich:column>
						<rich:column id="numberInExColumn" label="#{msg.numberInEx}"
							width="55px">
							<f:facet name="header">
								<h:outputText value="#{msg.numberInEx}" />
							</f:facet>
							<h:outputText value="#{item.numberInEx}" />
						</rich:column>
						<rich:column id="suburbColumn" label="#{msg.suburb}" width="14%">
							<f:facet name="header">
								<h:outputText value="#{msg.suburb}" />
							</f:facet>
							<h:outputText value="#{item.suburb}" />
						</rich:column>
						<rich:column id="zipCodeColumn" label="#{msg.zipCode}"
							width="50px">
							<f:facet name="header">
								<h:outputText value="#{msg.zipCode}" />
							</f:facet>
							<h:outputText value="#{item.zipCode}" />
						</rich:column>
						<rich:column id="phoneNumberColumn" label="#{msg.telephone}"
							width="8%">
							<f:facet name="header">
								<h:outputText value="#{msg.telephone}" />
							</f:facet>
							<h:outputText value="#{item.telephone1}" />
						</rich:column>
						<rich:column width="100px" id="acciones" label="#{msg.acciones}">
							<f:facet name="header">
								<h:outputText value="#{msg.acciones}" />
							</f:facet>
							<a4j:commandLink ajaxSingle="true" id="editCompany">
								<h:graphicImage value="/static/images/edit.png"
									style="border: 0" />
								<f:setPropertyActionListener value="#{item}"
									target="#{beanCompany.currentItem}" />
								<rich:componentControl for="mpEditarCompany"
									attachTo="editCompany" operation="show" event="onclick" />
							</a4j:commandLink>
							<a4j:commandLink ajaxSingle="true" id="companyDetails">
								<h:graphicImage value="/static/images/detail.png"
									style="border: 0" />
								<f:setPropertyActionListener value="#{item}"
									target="#{beanCompany.seeItem}" />
								<rich:componentControl for="mpCompanyDetail"
									attachTo="companyDetails" operation="show" event="onclick" />
							</a4j:commandLink>
							<rich:toolTip for="companyDetails" value="#{msg.ver}" />
							<a4j:commandLink ajaxSingle="true" id="deleteCompany">
								<h:graphicImage value="/static/images/delete.png"
									style="border: 0" />
								<f:setPropertyActionListener value="#{item}"
									target="#{beanCompany.deleteItem}" />
								<rich:componentControl for="mpBorrarCompany"
									attachTo="deleteCompany" operation="show" event="onclick" />
							</a4j:commandLink>
							<rich:toolTip for="deleteCompany" value="#{msg.borrar}" />
							<a4j:commandLink ajaxSingle="true" id="linkCompany"
								action="#{beanCompany.linkCompany}">
								<h:graphicImage value="/static/images/link_add.ico"
									style="border: 0" />
								<f:setPropertyActionListener value="#{item}" id="companyItem"
									target="#{beanCompany.seeItem}" />
								<f:setPropertyActionListener value="#{item}" id="linkItem"
									target="#{beanLink.currentCompany}" />
							</a4j:commandLink>
							<rich:toolTip for="linkCompany" value="#{msg.vincular}" />
						</rich:column>
						<f:facet name="footer">
							<rich:datascroller id="datascroller" renderIfSinglePage="false" />
						</f:facet>
					</rich:extendedDataTable>


					<!-- Inicio Modal Panel Borrar -->
					<rich:modalPanel id="mpBorrarCompany" height="110" width="250">
						<f:facet name="header">
							<h:panelGroup>
								<h:outputText value="#{msg.borrar}"></h:outputText>
							</h:panelGroup>
						</f:facet>
						<p>La compañía seleccionada será eliminada permanentemente del
							sistema.</p>
						<a4j:outputPanel ajaxRendered="true">
							<h:panelGrid columns="2" style="margin-left: auto;">
								<h:panelGroup>
									<a4j:commandButton id="continueDeleteCompany"
										value="#{msg.continuar}" ajaxSingle="true"
										action="#{beanCompany.deleteCompany}"
										oncomplete="#{rich:component('mpBorrarCompany')}.hide();"
										reRender="table" />
								</h:panelGroup>
								<h:panelGroup>
									<a4j:commandButton value="#{msg.cancelar}" id="btnCancel"
										onclick="#{rich:component('mpBorrarCompany')}.hide();return false;" />
								</h:panelGroup>
							</h:panelGrid>
						</a4j:outputPanel>
					</rich:modalPanel>
					<!-- Fin Modal Panel Borrar -->
				</rich:panel>
			</a4j:form>
			<!-- Inicio Modal Panel Agregar -->
			<rich:modalPanel id="mpAgregarCompany" autosized="true" width="1000">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="#{msg.agregar}"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:graphicImage value="/static/images/close.png" id="hidelink" />
						<rich:componentControl for="mpAgregarCompany" attachTo="hidelink"
							operation="hide" event="onclick" />
					</h:panelGroup>
				</f:facet>
				<a4j:form>
					<a4j:outputPanel ajaxRendered="true">
						<h:panelGrid columns="1">
							<h:panelGroup>
								<h:outputText value="#{msg.datosGenerales}"
									style="font-weight:bold; font-size:15px;" />
							</h:panelGroup>
							<rich:separator />
							<h:panelGrid columns="2">
								<h:panelGrid columns="3" columnClasses="col6,col5,col5">
									<h:outputText value="#{msg.tradename} :"
										style="font-weight:bold" />
									<h:inputText id="newTradenameInput"
										value="#{beanCompany.newTradename}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newTradenameInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.commercialBusiness} :"
										style="font-weight:bold" />
									<h:inputText id="newCorporateSpinInput"
										value="#{beanCompany.newCorporateSpin}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newCorporateSpinInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.infonavit} :"
										style="font-weight:bold" />
									<h:inputText id="newInfonavitInput"
										value="#{beanCompany.newInfonavit}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newInfonavitInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.stps} :" style="font-weight:bold" />
									<h:inputText id="newStpsInput" value="#{beanCompany.newStps}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newStpsInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
								<h:panelGrid columns="3" columnClasses="col6,col5,col5">
									<h:outputText value="#{msg.socialReason} :"
										style="font-weight:bold" />
									<h:inputText id="socialReasonInput"
										value="#{beanCompany.newSocialReason}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="socialReasonInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.rfc} :" style="font-weight:bold" />
									<h:inputText id="newRfcInput" value="#{beanCompany.newRfc}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newRfcInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.legalRepresentative} :"
										style="font-weight:bold" />
									<h:inputText id="newLegalRepInput"
										value="#{beanCompany.newLegalRepresentative}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newLegalRepInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.stpsRepresentative} :"
										style="font-weight:bold" />
									<h:inputText id="newStpsRepInput"
										value="#{beanCompany.newStpsRepresentative}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newStpsRepInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="1">
								<h:panelGroup>
									<h:outputText value="#{msg.domicilio}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="9"
									columnClasses="col6,col5,col5,col6,col5,col5,col6,col5,col5">
									<h:outputText value="#{msg.city} :" style="font-weight:bold" />
									<h:inputText id="newCountryInput"
										value="#{beanCompany.newCountry}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newCountryInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.state} :" style="font-weight:bold" />
									<h:inputText id="newStateInput" value="#{beanCompany.newState}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newStateInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.suburb} :" style="font-weight:bold" />
									<h:inputText id="newSuburbInput"
										value="#{beanCompany.newSuburb}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newSuburbInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.street} :" style="font-weight:bold" />
									<h:inputText id="newStreetInput"
										value="#{beanCompany.newStreet}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newStreetInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.numberInEx} :"
										style="font-weight:bold" />
									<h:inputText id="newNumberInExInput"
										value="#{beanCompany.newNumberInEx}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newNumberInExInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.zipCode}" style="font-weight:bold" />
									<h:inputText id="newZipCodeInput"
										value="#{beanCompany.newZipCode}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newZipCodeInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
								<h:panelGroup>
									<h:outputText value="#{msg.contacto}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="9"
									columnClasses="col6,col5,col5,col6,col5,col5,col6,col5,col5">
									<h:outputText value="#{msg.telephone} #1 :"
										style="font-weight:bold" />
									<h:inputText id="newPhonenumber1Input"
										value="#{beanCompany.newTelephone1}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newPhonenumber1Input"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.telephone} #2 : "
										style="font-weight:bold" />
									<h:inputText id="newPhonenumber2Input"
										value="#{beanCompany.newTelephone2}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newPhonenumber2Input"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.email} :" style="font-weight:bold" />
									<h:inputText id="newEmailInput" value="#{beanCompany.newEmail}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newEmailInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.web} :" style="font-weight:bold" />
									<h:inputText id="newWebInput" value="#{beanCompany.newWeb}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newWebInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.fax} :" style="font-weight:bold" />
									<h:inputText id="newFaxInput" value="#{beanCompany.newFax}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="newFaxInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="2" style="margin-left: auto;">
								<a4j:commandButton value="#{msg.continuar}"
									id="continueAddCompany" action="#{beanCompany.createCompany}"
									oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('mpAgregarCompany')}.hide();" />
							</h:panelGrid>
						</h:panelGrid>
					</a4j:outputPanel>
				</a4j:form>
			</rich:modalPanel>
			<!-- Fin Modal Panel Agregar -->
			<!-- Inicio Modal Panel Editar -->
			<rich:modalPanel id="mpEditarCompany" autosized="true" width="900">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="#{msg.editar}"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:graphicImage value="/static/images/close.png" id="hideEditlink" />
						<rich:componentControl for="mpEditarCompany"
							attachTo="hideEditlink" operation="hide" event="onclick" />
					</h:panelGroup>
				</f:facet>
				<a4j:form>
					<a4j:outputPanel ajaxRendered="true">
						<h:panelGrid columns="1">
							<h:panelGroup>
								<h:outputText value="#{msg.datosGenerales}"
									style="font-weight:bold; font-size:15px;" />
							</h:panelGroup>
							<rich:separator />
							<h:panelGrid columns="2">
								<h:panelGrid columns="3" columnClasses="col6,col5,col5">
									<h:outputText value="#{msg.tradename} :"
										style="font-weight:bold" />
									<h:inputText id="editTradenameInput"
										value="#{beanCompany.tradename}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editTradenameInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.commercialBusiness} :"
										style="font-weight:bold" />
									<h:inputText id="editCorporateSpinInput"
										value="#{beanCompany.corporateSpin}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editCorporateSpinInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.infonavit} :"
										style="font-weight:bold" />
									<h:inputText id="editInfonavitInput"
										value="#{beanCompany.infonavit}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editInfonavitInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.stps} :" style="font-weight:bold" />
									<h:inputText id="editStpsInput" value="#{beanCompany.stps}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editStpsInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
								<h:panelGrid columns="3" columnClasses="col6,col5,col5">
									<h:outputText value="#{msg.socialReason} :"
										style="font-weight:bold" />
									<h:inputText id="editSocialReasonInput"
										value="#{beanCompany.socialReason}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editSocialReasonInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.rfc} :" style="font-weight:bold" />
									<h:inputText id="editRfcInput" value="#{beanCompany.rfc}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editRfcInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.legalRepresentative} :"
										style="font-weight:bold" />
									<h:inputText id="editLegalRepInput"
										value="#{beanCompany.legalRepresentative}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editLegalRepInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.stpsRepresentative} :"
										style="font-weight:bold" />
									<h:inputText id="editStpsRepInput"
										value="#{beanCompany.stpsRepresentative}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editStpsRepInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="1">
								<h:panelGroup>
									<h:outputText value="#{msg.domicilio}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="9" columnClasses="col6,col5,col5,col6,col5,col5,col6,col5,col5">
									<h:outputText value="#{msg.city} :" style="font-weight:bold" />
									<h:inputText id="editCountryInput"
										value="#{beanCompany.country}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editCountryInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.state} :" style="font-weight:bold" />
									<h:inputText id="editStateInput" value="#{beanCompany.state}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editStateInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.suburb} :" style="font-weight:bold" />
									<h:inputText id="editSuburbInput" value="#{beanCompany.suburb}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editSuburbInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.street} :" style="font-weight:bold" />
									<h:inputText id="editStreetInput" value="#{beanCompany.street}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editStreetInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.numberInEx} :"
										style="font-weight:bold" />
									<h:inputText id="editNumberInExInput"
										value="#{beanCompany.numberInEx}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editNumberInExInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.zipCode}" style="font-weight:bold" />
									<h:inputText id="editZipCodeInput"
										value="#{beanCompany.zipCode }" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editZipCodeInput"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
								<h:panelGroup>
									<h:outputText value="#{msg.contacto}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="9"
									columnClasses="col6,col5,col5,col6,col5,col5,col6,col5,col5">
									<h:outputText value="#{msg.telephone} #1 :"
										style="font-weight:bold" />
									<h:inputText id="editPhonenumber1Input"
										value="#{beanCompany.telephone1}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editPhonenumber1Input"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.telephone} #2 : "
										style="font-weight:bold" />
									<h:inputText id="editPhonenumber2Input"
										value="#{beanCompany.telephone2}" style="width: 150px;"
										maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editPhonenumber2Input"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.fax} :" style="font-weight:bold" />
									<h:inputText id="editFaxInput" value="#{beanCompany.fax}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editFaxInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.email} :" style="font-weight:bold" />
									<h:inputText id="editEmailInput" value="#{beanCompany.email}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editEmailInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.web} :" style="font-weight:bold" />
									<h:inputText id="editWebInput" value="#{beanCompany.web}"
										style="width: 150px;" maxlength="40">
										<rich:ajaxValidator event="onblur" />
									</h:inputText>
									<rich:message for="editWebInput"
										style="font-size:10px;font-family:Arial;color:red;" />
									<h:outputText value="#{msg.active}" />
									<h:selectOneMenu id="activePortal"
										value="#{beanUserPortal.isActive}"
										style="width: 150px; margin-left: 2px;" maxlength="1">
										<f:selectItem itemLabel="Estado......." itemValue="-1" />
										<f:selectItem itemLabel="Activo" itemValue="0" />
										<f:selectItem itemLabel="Inactivo" itemValue="1" />
										<rich:ajaxValidator event="onblur" />
									</h:selectOneMenu>
									<rich:message for="activePortal"
										style="font-size:10px;font-family:Arial;color:red;" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="2" style="margin-left: auto;">
								<a4j:commandButton value="#{msg.aceptar}"
									id="continueEditCompany" action="#{beanCompany.updateCompany}"
									oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('mpEditarCompany')}.hide();" />
							</h:panelGrid>
						</h:panelGrid>
					</a4j:outputPanel>
				</a4j:form>
			</rich:modalPanel>
			<!-- Fin Modal Panel Editar -->
			<!-- Inicio Modal Panel Ver -->
			<rich:modalPanel id="mpCompanyDetail" autosized="true" width="620">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="#{msg.ver}"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:graphicImage value="/static/images/close.png" id="showlink" />
						<rich:componentControl for="mpCompanyDetail" attachTo="showlink"
							operation="hide" event="onclick" />
					</h:panelGroup>
				</f:facet>
				<a4j:form>
					<a4j:outputPanel ajaxRendered="true">
						<a4j:keepAlive beanName="beanCompany" />
						<h:panelGrid columns="1">
							<h:panelGroup>
								<h:outputText value="#{msg.datosGenerales}"
									style="font-weight:bold; font-size:15px;" />
							</h:panelGroup>
							<rich:separator />
							<h:panelGrid columns="2">
								<h:panelGrid columns="2" columnClasses="col1,col2">
									<h:outputText value="#{msg.tradename} :"
										style="font-weight:bold;" />
									<h:outputText value=" #{beanCompany.viewTradename}" />
									<h:outputText value="#{msg.commercialBusiness} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewCorporateSpin}" />
									<h:outputText value="#{msg.infonavit} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewInfonavit}" />
									<h:outputText value="#{msg.stps} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewStps}" />
								</h:panelGrid>
								<h:panelGrid columns="2" columnClasses="col1,col2"
									style="margin-left: auto; margin-right: auto;  margin-top: auto;">
									<h:outputText value="#{msg.socialReason} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewSocialReason}" />
									<h:outputText value="#{msg.rfc} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewRfc}" />
									<h:outputText value="#{msg.legalRepresentative} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewLegalRepresentative}" />
									<h:outputText value="#{msg.stpsRepresentative} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewStpsRepresentative}" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="1">
								<h:panelGroup>
									<h:outputText value="#{msg.domicilio}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="6">
									<h:outputText value="#{msg.city} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewCountry}" />
									<h:outputText value="#{msg.state} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewState}" />
									<h:outputText value="#{msg.suburb} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewSuburb}" />
									<h:outputText value="#{msg.street} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewStreet}" />
									<h:outputText value="#{msg.numberInEx} :"
										style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewNumberInEx}" />
									<h:outputText value="#{msg.zipCode}" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewZipCode }" />
								</h:panelGrid>
								<h:panelGroup>
									<h:outputText value="#{msg.contacto}"
										style="font-weight:bold; font-size:15px;" />
								</h:panelGroup>
								<rich:separator />
								<h:panelGrid columns="6">
									<h:outputText value="#{msg.telephone} #1 :"
										style="font-weight:bold; text-align:right;" />
									<h:outputText value="#{beanCompany.viewTelephone1}" />
									<h:outputText value="#{msg.telephone} #2 : "
										style="font-weight:bold; text-align:right;" />
									<h:outputText value="#{beanCompany.viewTelephone2} " />
									<h:outputText value="#{msg.fax} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewFax}" />
									<h:outputText value="#{msg.email} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewEmail}" />
									<h:outputText value="#{msg.web} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewWeb}" />
									<h:outputText value="#{msg.active} :" style="font-weight:bold" />
									<h:outputText value="#{beanCompany.viewIsActive}" />
								</h:panelGrid>
							</h:panelGrid>
						</h:panelGrid>
					</a4j:outputPanel>
				</a4j:form>
			</rich:modalPanel>
			<!-- Fin Modal Panel Ver -->
		</ui:define>
	</ui:composition>
</ui:composition>